package util.pref;

import java.util.HashMap;

/**
 * This class provides the interface for managing (saving and loading)
 * preferences like username, ftp details and other settings. It is implemented
 * by the PrefHandler class.
 * @author Robert
 */
public interface PrefInterface {
    /**
     * Reads preferences from a file. Just provide the keys you want to read.
     * @param keys The key indicators of the key-value pairs in the file
     * @return An array of strings (in the same order as the provided keys)
     */
    public HashMap<String, String> getPreferences(String[] keys);
     /**
     * Saves preferences in a file. If a key-value pair does not exist, it
     * creates a new one in the file. If it does exist, it overwrites the old
     * value.
     * @param pairs A HashMap that contains the key-value pairs to be saved.
     * @return return True if saved successfully, false if not.
     */
    public Boolean setPreferences(HashMap<String, String> pairs);

    /**
     * Reads all preferences from a file.
     * @param None
     * @return HashMap of key:value pairs in file
     * @author Maris
     */
	public HashMap<String, String> getAllPreferences();
}
